import java.util.Scanner;

class Solution {
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * public String solve (String str1, String str1)
     * @param str1 string字符串
     * @param str2 string字符串
     * @return string字符串
     */
    public static String solve (String str1, String str2) {
        // write code here

    }

    public static void main(String[] args) {

    }
}


public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str1 = in.nextLine();
            String str2 = in.nextLine();
            System.out.println(func(str1, str2));
        }
    }
    public static String func(String str1,String str2) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if (!str2.contains(ch + "") ) {
                stringBuilder.append(ch);
            }
        }
        return stringBuilder.toString();
    }



    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String a = in.nextLine();
            String b = in.nextLine();
            String ret1 = a.toLowerCase();
            String ret2 = b.toLowerCase();
            System.out.println(ret1);
            System.out.println(ret2);
        }
    }


    //1  1  2  3  5  8  13  21...
    public static int fib(int x) {
        if(x == 1 || x == 2) {
            return 1;
        }
        return fib(x -1) + fib(x-2);
    }
    public static void main1(String[] args) {
        System.out.println(fib(2));
    }
}